<div class="content">

<%=render :partial=>"breadcrumb"%>


<% while @i < @albums.size do %>
 <div class="album">
  <% if @photos[@i]!=nil %>
      <% image = image_tag(@photos[@i].to_url(:thumbnail), :id=>"photo_#{@photos[@i].id}", :title=>@albums[@i].title) %>
       <%= link_to image, :action=>"album_page", :id=>@albums[@i]%>
      <% else %>
       <%= link_to(image_tag("/stylesheets/"+get_scheme+"/images/noimage"), :action=>"album_page", :id=>@albums[@i]) %>
     <% end %>
<br/>
    <%= link_to "#{ @albums[@i].title}", :action=>"album_page", :id=>@albums[@i] %>
<br/>
    <%=link_to _("Edit"), :controller=>"albums",:action=>"edit" ,:id=>@albums[@i]%>&nbsp;
    <%= link_to _("Delete"), {:controller=>"albums", :action=>"destroy", :id=>@albums[@i]},
                                        :onclick => "return confirm(\"#{_('All photos in album will be deleted. Are you sure you want to delete album')}\" + ' \"#{@albums[@i].title}\"?');",
                                        :class => "desctructive" %>
</div>
<% @i+=1 %>
<% end %>
</div>